lesia.register({
	name: 'lesia.data.DataSet',
	require: 'lesia.events.EventTarget'
}, function (l, EventTarget) {
	
	/**
	 * @constructor
	 */
	var DataSet = function () {
		//creates records
		this._records = [];
	};
	
	l.extend(DataSet, EventTaget);
	
	DataSet.EventTypes = DataSet.pototype.EventTypes = {
			READY: 'ready',
			UPDATED: 'updated'
	};
	
	/**
	 * Consists number of records in the dataset
	 * @type {Number}
	 */
	Object.defineProperty(DataSet.prototype, 'count', {
		get: function () {
			return  this._records.length;
		}
	});
	
	Object.defineProperty(DataSet.prototype, 'lastRecord', {
		get: function () {
			return this._records[this.count];
		},	
	});
	
	/**
	 * Push records to the dataset
	 * @param {lesia.data.Record} record
	 * @return {Number}
	 */
	DataSet.prototype.push = function (record /*, ...*/) {
		return this._records.push.apply(this._records, arguments);
	};
	
	/**
	 * Returns record by index
	 * @returns {lesia.data.Record}
	 */
	DataSet.prototype.getRecordByIndex = function (index) {
		return this._records[index];
	};
	
	/**
	 * Returns record by key
	 * @returns {lesia.data.Record}
	 */
	DataSet.prototype.getRecord = function (key) {
		
	};
	
	return DataSet;
});